package com.zhuimeng.guavahomework.controller;

import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder;

import java.util.concurrent.TimeUnit;

public class Test {
    public static void main(String[] args) {
        Cache<Object, Object> guauaCache = CacheBuilder.newBuilder().expireAfterAccess(3, TimeUnit.SECONDS).build();

        guauaCache.put("a","aaaaaaaaaaaa");
        System.out.println(guauaCache.getIfPresent("p"));
    }
}
